package org.zn.note.jdk.net;

import org.jpos.iso.ISOUtil;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @ClassName Test
 * @Author zn
 * @Date 2019/6/14 16:13
 **/
public class Test {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket(5002);
        Socket socket = serverSocket.accept();
        byte[] b = new byte[2048];
        socket.getInputStream().read(b);
        System.out.println(ISOUtil.byte2hex(b));
    }
}
